package com.shycloud.mido.member.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shycloud.mido.member.api.entity.DistDistributor;
import com.shycloud.mido.opter.api.dto.SysUserDto;
import org.apache.ibatis.annotations.Param;

/**
 * @author nianhua.jiang
 */
public interface DistDistributorMapper extends BaseMapper<DistDistributor> {

	/**
	 * 创建经销商
	 *
	 * @param user 系统用户信息
	 * @return int
	 * @author nianhua.jiang
	 * @date 2021/6/30 14:01
	 */
	int createDistributorUser(@Param("user") SysUserDto user);

	/**
	 * 生成经销商账户对应的权限
	 *
	 * @param userId 系统用户 ID
	 * @return int
	 * @author nianhua.jiang
	 * @date 2021/6/30 14:09
	 */
	int createSysUserRole(@Param("userId") String userId);
}